package cn.org.timespace.easyframe.model.permission;

/**
 * EfDictionaryId entity. @author MyEclipse Persistence Tools
 */

public class EfDictionaryId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -444337315244728437L;
	private String groupname;
	private String itemvalue;

	// Constructors

	/** default constructor */
	public EfDictionaryId() {
	}

	/** full constructor */
	public EfDictionaryId(String groupname, String itemvalue) {
		this.groupname = groupname;
		this.itemvalue = itemvalue;
	}

	// Property accessors

	public String getGroupname() {
		return this.groupname;
	}

	public void setGroupname(String groupname) {
		this.groupname = groupname;
	}

	public String getItemvalue() {
		return this.itemvalue;
	}

	public void setItemvalue(String itemvalue) {
		this.itemvalue = itemvalue;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EfDictionaryId))
			return false;
		EfDictionaryId castOther = (EfDictionaryId) other;

		return ((this.getGroupname() == castOther.getGroupname()) || (this
				.getGroupname() != null
				&& castOther.getGroupname() != null && this.getGroupname()
				.equals(castOther.getGroupname())))
				&& ((this.getItemvalue() == castOther.getItemvalue()) || (this
						.getItemvalue() != null
						&& castOther.getItemvalue() != null && this
						.getItemvalue().equals(castOther.getItemvalue())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getGroupname() == null ? 0 : this.getGroupname().hashCode());
		result = 37 * result
				+ (getItemvalue() == null ? 0 : this.getItemvalue().hashCode());
		return result;
	}

}